home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / basa2gfa / basica.txt < prev    next >
Text File  |  1995-04-27  |  3KB  |  72 lines

  1. PC BASICA to Atari ST GFA BASIC 3 translation utility
  2. by myeck waters
  3. text updated 94/08/24
  4.  
  5. BASICA.GFA is a quick-and-dirty program to aid in converting programs
  6. written for the old BASICA used on IBM compatibles to GFA BASIC 3.  Output
  7. is in the form of a text file that is loaded into GFA using the MERGE
  8. function.
  9.  
  10. This will not produce a completed translation but will greatly shorten the
  11. time needed to do it.
  12.  
  13. WHAT IT WILL DO:
  14.  
  15.      Remove unnecessary line numbers.
  16.  
  17.      Convert the remaining line numbers to the GFA format, e.g.:
  18.      PROCEDURE 1000  (for lines referenced by a GOSUB)
  19.      1000:  (for other lines)
  20.         
  21.      Convert the single-quote used in REMarks after commands to the
  22.      exclamation point used by GFA.
  23.  
  24.      Break up multi-statement lines, including multiple statements
  25.      following an "IF" statement, e.g.:
  26.      4340 IF SV.MIN=O THEN GOSUB 3800 ELSE 4360  'input data if missing
  27.           becomes:
  28.      IF SV.MIN=O 
  29.      GOSUB 3800 
  30.      ELSE 
  31.      GOTO 4360  !input data if missing
  32.      ENDIF
  33.      (GFA will handle the indentation automatically.  If it doesn't indent
  34.      properly, there is probably a problem with a PROCEDURE.)
  35.  
  36.           
  37. WHAT IT WON'T DO:
  38.  
  39.      Convert or remove BASICA commands that don't exist in GFA.
  40.  
  41.      Change the syntax in when it's different, e.g.:
  42.      BASICA syntax for PRINT USING is:
  43.      1290 PRINT USING"f3=###.# Hz";F3  (note the semicolon)
  44.      GFA syntax is:
  45.      PRINT USING"f3=###.# Hz",F3  (note the comma)
  46.  
  47.      Compensate for differences in screen resolution or text height.
  48.  
  49. OTHER PROBLEMS:
  50.  
  51.      Most other problems are caused by the differences between BASICA,
  52. which allows unstructured programming, and GFA, which doesn't like it. 
  53. Code that jumps in and out of procedures, or procedures that have more than
  54. one RETURN statement, will be flagged if you use GFA's TEST command, and
  55. can throw off GFA's indenting.  The code may still run in that form,
  56. however.
  57.  
  58.      Another little problem is that BASICA programs can have both GOTOs and
  59. GOSUBs to the same line number.  This program's GOSUB detector only works
  60. the first time a particular line number is referenced.  If the first time
  61. is a GOTO (or a THEN or an ELSE), and the next is a GOSUB, it won't be
  62. labled a PROCEDURE.
  63.  
  64.  
  65. I hope you find this program useful.  Compiling it should result in much
  66. faster execution.
  67.  
  68. GEnie: myeck.waters
  69. InterNet: myeck.waters@genie.geis.com
  70. AtariNet: myeck waters of 51:4/4.4
  71. FidoNet: myeck waters of 1:107/662.4
  72.